package com.joysuch.wwyt.attendant.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 区域同步状态
 *
 * @author xsx
 * @version 1.0
 * @date 2023/2/16 17:45
 */
public enum AreaSyncEnum {

    no_sync(0, "未同步"),

    sync(1, "已同步");

    private Integer value;

    private String desc;

    AreaSyncEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<Integer, AreaSyncEnum> lookup = new HashMap<>();

    static {
        for (AreaSyncEnum e : EnumSet.allOf(AreaSyncEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static AreaSyncEnum find(Integer value) {
        return lookup.get(value);
    }
}
